package cm.tl.pms.exception;

public class PmsException extends RuntimeException {
    private IError error;

    public PmsException(IError error, String... args) {
        super(args.length == 0 ? error.getMessage() : String.format(error.getMessage(), args));
        this.error = error;
    }

    public PmsException(IError error, String message) {
        super(message);
        this.error = error;
    }
}
